<div class="nav-tab">
  <a href="{{prefix}}order/myOrder/myOrderList.html?status={{navItem.id}}" ng-class="{'active' : getData.status == navItem.id}" style="width:20%;" ng-repeat="navItem in navTab track by $index" bindonce>
    {{navItem.name}}
  </a>
</div>
<!-- ngRepeat: item in listData track by $index -->
<div class="order-start-lay" ng-repeat="item in listData track by $index" bindonce bottom-scroll="load()">
  <div class="order-title">
    <span class="num">
      订单号:{{::item.orderNo}}
    </span>
    <a href="{{prefix}}order/myOrder/myOrderDetail.html?orderNo={{item.orderNo}}" class="start">
      订单详情
      <i class="iconfont icon-qianjin"></i>
    </a>
    <p class="time" ng-show="getData.status == 0">
      <span countdown="" countdown-data="item.timeoutCloseTime" countdown-start="付款时间还剩余" countdown-end="已失效" class="ng-isolate-scope"></span>
    </p>
  </div>
  <div class="order-list">
    <ul>
        <li ng-repeat="childItem in item.goodsList track by $index" bindonce>
            <div class="item-lay">
                <a href="{{prefix}}detail.html?goodsId={{childItem.goodsId}}" class="item-img">
                    <div class="img-lay">
                        <img lazy-img="{{::childItem.image}}">
                    </div>
                </a>
                <div class="item-info">
                    <div class="item-title ng-binding">
                        {{::childItem.title}}
                    </div>
                    <div class="bottom">
                        <div class="left">
                            <em>￥{{::childItem.price}}</em>
                            <s ng-if="childItem.price != childItem.originPrice">￥{{::childItem.originPrice}}</s>
                        </div>
                        <div class="right">
                        <span>
                          数量:{{::childItem.buyNumber}}件
                        </span>
                        </div>
                    </div>
                </div>
            </div>
        </li>
    </ul>
    <!-- ngIf: postData.orderStatus <=3 -->
    <section class="start-buttons item-list">
      <span>合计:￥{{::item.totalAmount}}</span>
      <div class="operation" ng-switch="getData.status">
          <div ng-switch-when="0">
            <button class="close" ng-click="orderClose(item.orderNo,$index)">
              取消订单
            </button>
            <button ng-click="goPay(item)">
              付款
            </button>
          </div>
          <div ng-switch-when="1">
              <button class="close" ng-click="orderClose(item.orderNo)">
                  取消订单
              </button>
          </div>
          <div ng-switch-when="2">
              <button class="close" ng-click="applyEfund(item.orderNo)">
                  申请退款
              </button>
              <a href="{{prefix}}order/logistic.html?orderNo={{item.orderNo}}" class="close">
                  查看物流
              </a>
              <button ng-click="confirmDelivery(item.orderNo,$index)">
                  确认收货
              </button>
          </div>
          <div ng-switch-when="3">
              <button class="close" ng-click="applyEfund(item.orderNo)">
                  申请退款
              </button>
              <a href="{{prefix}}order/logistic.html?orderNo={{item.orderNo}}" class="close">
                  查看物流
              </a>
          </div>
      </div>
    </section>
    <!-- end ngIf: postData.orderStatus <=3 -->
  </div>
</div>


<modal-dialog show='applyEfundMoadl' class="apply-efund">
    <textarea placeholder="请填写理由,以便我们能提供更好的服务!" ng-model="applyEfundItemData.refundReason" class="efund-text"></textarea>
    <div class="buttons">
        <button type="button" ng-click="efundMoadlTot()">取消</button>
        <button type="button" ng-click="applyEfundSuc()">确定</button>
    </div>
</modal-dialog>
